<template>
  <div>
    <el-input
      :placeholder="`请输入${titleName}并按下回车进行搜索`"
      v-model="inputSearch"
      @keyup.enter.native="search"
      clearable>
    </el-input>
  </div>
</template>

<script>
export default {
    name:'CommonSearch',
    data(){
      return{
        inputSearch:'',
      }
    },
    props:['titleName'],
    methods:{
      search(){
        this.$emit('searchData',this.inputSearch);
      }
    }
}
</script>

<style>

</style>